<template>
  <div class="item-container">
<!--    <img class="avatar" :src="data.userInfo?.avatar" alt="" />-->
    <yd-img width="30px" height="30px" :src="data.userInfo?.avatar" style="margin-right: 15px"></yd-img>
    <div class="content">
      <div class="title-row" v-if="type === 2">
        <div class="introduce">
          <span style="color: #000;font-size: 14px">{{ data.userInfo?.nickname }}</span>
          <span style="color: rgb(158, 158, 158); font-size: 10px">{{data.isOwner ? '我' : data.userInfo?.nickname}} :{{data.applyInfo}}</span>
        </div>
        <div class="status">
          <span v-if="data.status === 0" style="font-size: 10px">等待验证</span>
          <span v-if="data.status === 1" style="font-size: 10px">已添加</span>
        </div>
      </div>

      <span v-if="type === 1" class="title">{{data.userInfo?.nickname}}</span>
    </div>
  </div>
</template>

<script setup>
import ydImg from '@/components/img/index.vue'
const { type , data } = defineProps(['data', 'type'])


</script>

<style scoped lang="less">
.item-container {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 10px 35px;
  padding-right: 20px;
  display: flex;
  align-items: center;

  .avatar {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    margin-right: 10px;
  }

  .content {
    flex: 1;
    display: flex;
    align-items: center;


    .title-row {
      display: flex;
      width: 100%;
      justify-content: space-between;
      align-items: center;
      height: 100%;
      text-wrap: nowrap;

      .introduce {
        display: flex;
        flex-direction: column;
      }
      .status {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: 46px;
        color: rgb(158, 158, 158);
      }
    }
  }


  .title {
    font-size: 15px;
    //font-weight: bolder;
    color: black;
  }
}
</style>
